<style>
.feedback{text-align:center;position: relative;}
.feedback .i_close{position: absolute;top:0;right:10px;font-size:32px;cursor:pointer;color:#ff0000;font-weight:bold}
.feedback .i_tb{margin:10px auto 0 auto}
.feedback .i_tb td{text-align:left;vertical-align:top;padding:8px 6px;font-size:16px}
.feedback .i_title{margin-top:10px;padding:10px;font-size:18px}
</style>
<form id="myform" action="/services/service.php?m=u&a=feedback" method="post">
<div class="feedback">
	<div class="i_close" onclick="doclose()">×</div>
    <p class="i_title">Hi, <b>{$_FANWE['user_name']}</b>：请您留言！</p>
    <table class="i_tb">
        <tr>
            <td>留言</td>
            <td>
                <textarea name="msg" rows="8" cols="64" class="g_ipt1"></textarea>
            </td>
        </tr>
        <tr>
            <td>标签</td>
            <td>
                {loop $tags $i $tag}
                <label><input type="radio" name="tagid" value="{$tag['id']}"{if $i == 0} checked{/if}> {$tag['tagname']}</label>
                {/loop}
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><label><input type="checkbox" name="notshow" value="1"> 以后不再弹出</label></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><input type="submit" name="dopost" class="g_btn1" value="留言"></td>
        </tr>
    </table>
</div>
</form> 
<script type="text/javascript" src="/public/js/jquery.form.min.js"></script>
<script type="text/javascript">
$('#myform').ajaxForm({
    success : function(s) {
        alert('感谢您的留言！');
        doclose();
    }
});

function doclose() {
    $.weeboxs.close();
    window.onbeforeunload = function() {}
    var browserName = navigator.appName;
    if(browserName == "Microsoft Internet Explorer"){
        var ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false;  
        if (ie7) {
        //This method is required to close a window without any prompt for IE7 & greater versions.
        window.open('','_parent','');
        window.close();
        } else {
            //This method is required to close a window without any prompt for IE6
            this.focus();
            self.opener = this;
            self.close();
        }
    }else{
        //For NON-IE Browsers except Firefox which doesnt support Auto Close
        try{
            this.focus();
            self.opener = this;
            self.close();
        }catch(e){}
        
        try{
            window.open('','_self','');
            window.close();
        }catch(e){}
    }
}
</script>